package com.paperless.model;

import androidx.annotation.IntDef;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.HashMap;
import java.util.concurrent.LinkedBlockingQueue;

/**
 * @author : Administrator
 * date : 2022/4/26 9:58
 * description : jni回调类中需要的数据
 */
public class CallValue {
    /**
     * 同屏参数，宽高需要按比例进行调整，比如有导航栏
     */
    public static int record_width, record_height, dpi = 120, bitrate = 500 * 1000,// bits/sec
            frameRate = 25, iframeInterval = 2;
//    public static int camera_width = 1280, camera_height = 720, rationW = 16, rationH = 9;
    public static int camera_width = 640, camera_height = 480, rationW = 4, rationH = 3;
    /**
     * 根据资源id存放，jni回调的解码数据
     */
    public static HashMap<Integer, LinkedBlockingQueue<FrameData>> decodeMap = new HashMap<>();
    /**
     * 后台解码数据对象池
     */
    public static LinkedBlockingQueue<FrameData> frameDataPool = new LinkedBlockingQueue<>(50);
    /**
     * 后台解码数据最大存放数量,默认是{@link Integer#MAX_VALUE}
     */
    public static final int CAPACITY = 50;
    public static volatile int frame_count = 0;
    /**
     * 当前界面状态:0主界面，1会议界面，2后台管理界面，3投票界面，4常用人员界面，5麒麟方图会议界面，6离线会议界面
     */
    public static int currentFaceStatus = -1;
    public static final int FACE_MAIN = 0;
    public static final int FACE_MEET = 1;
    public static final int FACE_MANAGE = 2;
    public static final int FACE_VOTE = 3;
    public static final int FACE_FREQUENT_STAFF = 4;
    /**
     * 麒麟方图会议界面
     */
    public static final int FACE_MANAGE_QLFT = 5;
    public static final int FACE_OFFLINE_MEETING = 6;
//    /**
//     * 博聆会议界面
//     */
//    public static final int FACE_MANAGE_BL = 6;

    @IntDef({FACE_MAIN, FACE_MEET, FACE_MANAGE, FACE_VOTE, FACE_FREQUENT_STAFF, FACE_MANAGE_QLFT, FACE_OFFLINE_MEETING})
    @Retention(RetentionPolicy.SOURCE)
    public @interface FaceStatus {
    }

    public static int channel_screen = 2;
    public static int channel_camera = 3;
    /**
     * 固定值：资源id
     */
    public static final int resource_id_0 = 0;
    public static final int resource_id_1 = 1;
    public static final int resource_id_2 = 2;
    public static final int resource_id_3 = 3;
    public static final int resource_id_4 = 4;
    public static final int resource_id_5 = 5;
    public static final int resource_id_6 = 6;
    public static final int resource_id_7 = 7;
    public static final int resource_id_8 = 8;
    public static final int resource_id_9 = 9;
    public static final int resource_id_10 = 10;
    public static final int resource_id_11 = 11;

    public static boolean isTableCardEnable = false;
    /**
     * 批量操作开关
     */
    public static boolean isMutilOper = false;
}
